﻿using System;
using System.Collections.Generic;
using Unknown.Framework.Database;
using Unknown.Framework.Transform;
using Unknown.Example.Entity.Personnel;

namespace Unknown.Example.OracleSql.Personnel
{
	/// <summary>
	/// 组织结构操作处理类
	/// </summary>
	public class OrganizationOperationHandler : AbstractReaderOperationHandler<Organization>
	{
		/// <summary>
		/// 转换
		/// </summary>
		/// <returns>结果</returns>
		protected override Organization Transform()
		{
			Organization result = new Organization();

			this.FieldPrefix = "T_";

			result.Pkid = this.AssignString("PKID", null);
			result.InsertOperator = this.AssignString("INSERT_OPERATOR", null);
			result.InsertTime = this.AssignTime("INSERT_TIME", null);
			result.UpdateOperator = this.AssignString("UPDATE_OPERATOR", null);
			result.UpdateTime = this.AssignTime("UPDATE_TIME", null);
			result.Validity = this.AssignInteger("VALIDITY", 0);
			result.IntegerSerial = this.AssignNumber("INTEGER_SERIAL", null);
			result.TextSerial = this.AssignString("TEXT_SERIAL", null);
			result.Remark = this.AssignString("REMARK", null);
			result.Department = this.AssignString("DEPARTMENT", null);
			result.Employee = this.AssignString("EMPLOYEE", null);

			return result;
		}
	}
}
